<template>
  <div >
  	<el-container class='main-wrap'>
  	  <el-header><Top></Top></el-header>
  	  <el-container>
  	    <Left class='main-left' @changeview='changeview' :type='type'></Left>
  	    <el-main><router-view v-if="is_show" :power='power'/></el-main>
  	  </el-container>
  	</el-container>
  </div>
</template>

<script>
  import Left from '@/components/public/Left'
  import Top from '@/components/public/Top'
  export default{
  	components:{
  		Left:Left,
  		Top:Top
  	},
  	data(){
  		return{
  			url : '/home',
			power:[],
			is_show:false,
			type:0,
			pictLoading:true
  		}
  	},
	watch:{
		power(){
			this.is_show = true;
		}
	},
	mounted() {
		this.url = this.$route.path;
	},
  	methods:{
		// homeview(item){
		// 	this.type ++;
		// },
  		changeview(arr){
			this.power = arr[1].children;
  			if(arr[0] == this.url)return;
  			this.url = arr[0];
			this.$router.push(arr[0]);
  		}
  	}
  }
  import '@/assets/css/main.css';
</script>
